projects
/
project
/
uclient.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7bfe2f
)
core: fix memory leak if url change fails
author
Felix Fietkau
<nbd@openwrt.org>
Sat, 16 Jan 2016 19:13:36 +0000
(20:13 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Sat, 16 Jan 2016 21:18:55 +0000
(22:18 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
uclient.c
patch
|
blob
|
history
diff --git
a/uclient.c
b/uclient.c
index
21f6f5d
..
2113d8d
100644
(file)
--- a/
uclient.c
+++ b/
uclient.c
@@
-182,8
+182,10
@@
int uclient_set_url(struct uclient *cl, const char *url_str, const char *auth_st
if (!url)
return -1;
- if (url->backend != cl->backend)
+ if (url->backend != cl->backend) {
+ free(url);
return -1;
+ }
free(cl->url);
cl->url = url;